const { DataTypes } = require('sequelize');
const sequelize = require('../config/database');

const Member = sequelize.define('member', {
  user_id: {
    type: DataTypes.STRING(32),
    allowNull: false,
    primaryKey: true,
    comment: '用户编号'
  },
  user_name: {
    type: DataTypes.STRING(50),
    allowNull: false,
    comment: '用户姓名'
  },
  student_id: {
    type: DataTypes.STRING(20),
    allowNull: false,
    unique: true,
    comment: '学号'
  },
  manager_id: {
    type: DataTypes.STRING(32),
    allowNull: false,
    comment: '负责人编号'
  }
}, {
  tableName: 'member',
  timestamps: true,
  createdAt: 'create_time',
  updatedAt: 'update_time'
});

module.exports = Member; 